$OpenBSD: patch-libgo_mksysinfo_sh,v 1.1 2011/11/19 22:19:53 pascal Exp $
--- libgo/mksysinfo.sh.orig	Thu Nov 17 20:21:36 2011
+++ libgo/mksysinfo.sh	Thu Nov 17 21:16:33 2011
@@ -96,7 +96,7 @@ grep '^const _E' gen-sysinfo.go | \
   sed -e 's/^\(const \)_\(E[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
 
 # The O_xxx flags.
-grep '^const _\(O\|F\|FD\)_' gen-sysinfo.go | \
+grep -E '^const _(O|F|FD)_' gen-sysinfo.go | \
   sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
 if ! grep '^const O_ASYNC' ${OUT} >/dev/null 2>&1; then
   echo "const O_ASYNC = 0" >> ${OUT}
@@ -139,7 +139,7 @@ if grep '^const ___WALL = ' gen-sysinfo.go >/dev/null 
 fi
 
 # Networking constants.
-grep '^const _\(AF\|SOCK\|SOL\|SO\|IPPROTO\|TCP\|IP\|IPV6\)_' gen-sysinfo.go |
+grep -E '^const _(AF|SOCK|SOL|SO|IPPROTO|TCP|IP|IPV6)_' gen-sysinfo.go |
   sed -e 's/^\(const \)_\([^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
 grep '^const _SOMAXCONN' gen-sysinfo.go |
   sed -e 's/^\(const \)_\(SOMAXCONN[^= ]*\)\(.*\)$/\1\2 = _\2/' \
@@ -318,7 +318,7 @@ if test "$stat" != ""; then
   grep '^type _stat64 ' gen-sysinfo.go
 else
   grep '^type _stat ' gen-sysinfo.go
-fi | sed -e 's/type _stat\(64\)\?/type Stat_t/' \
+fi | sed -e 's/type _stat/type Stat_t/' \
          -e 's/st_dev/Dev/' \
          -e 's/st_ino/Ino/g' \
          -e 's/st_nlink/Nlink/' \
@@ -344,7 +344,7 @@ if test "$dirent" != ""; then
   grep '^type _dirent64 ' gen-sysinfo.go
 else
   grep '^type _dirent ' gen-sysinfo.go
-fi | sed -e 's/type _dirent\(64\)\?/type Dirent/' \
+fi | sed -e 's/type _dirent/type Dirent/' \
          -e 's/d_name \[0+1\]/d_name [0+256]/' \
          -e 's/d_name/Name/' \
          -e 's/]int8/]byte/' \
